<?php
ob_start();
session_start();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>浏览所有商品</title>	
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link href="./bootstrap/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
body{
	font-family:微软雅黑;
	font-size:16px;
	color:#036;
	}
.cart_con{
	margin-top:30px;
}
</style>
<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<?php
//删除购物session中的信息
//启动会话
if(!empty($_GET['IDTEM']))
{
	unset($_SESSION['shopList'][$_GET['IDTEM']]);
	header("Location:myCart.php");
}
else
{
	unset($_SESSION['shopList']);
	/*if (isset($_COOKIE[session_name()]))
	{
		setcookie(session_name(), '', time()-1, '/');
	}*/
	echo "<div class=\"alert cart_con\">";
	echo "亲爱的，您<strong>已经清空你的购物车了</strong>快去<a href=\"homePage.php\" class=\"btn btn-inverse\">主页</a>继续搜寻您喜欢的宝贝吧！";
	echo "</div>";
	//session_destroy();
}

//header("Location:homePage.php");
?>
</div>
<script src="./bootstrap/js/bootstrap.min.js"></script>
<script src="./js/jquery-1.9.1.min.js"></script>
</body>
</html>
<?php
ob_end_flush();
?>

